communitytestfandomcom-20200222-history
Help:Live Preview extension
Live Preview is an editing extension created by Wikipedia:User:Pilaf which allows you to generate instant previews of the page you're editing. This is not to be confused with ' ' feature, which is a new feature in MediaWiki 1.5 that allows a page to be previewed without putting additional strain on the servers. Unlike MediaWiki's built-in preview feature, this gets generated into your browser on the fly, without needing a page reload, in fact with no delay at all (except for very long pages). You can implement Live Preview by adding some JavaScript to your monobook.js user subpage (see instructions) This help page is based on Pilaf's Live Preview instructions at Wikipedia. To use this on a Wikia other than this central one, please see the Installing on a different wiki instructions. The "Live Preview" name may be changing. Benefits Live Preview allows faster previews, often meaning gains in time and faster editing, as you would no longer have to wait for a page reload to see the results of your edits. The regular edit page preview works by sending the wiki text to the servers, which in turn processes it and sends the resulting page back. Although this is generally not too demanding for the servers, it does have a small hit which contributes to some extent to the general slowdown of large wiki sites such as Wikipedia. Conversely, Live Preview runs 100% on your computer, avoiding those (unnecessary) hits, thus giving some relief to the servers. The effectiveness of this, of course, depends on how many people actually stop using the regular preview when not needed. The standard preview is not believed to cause any problems to Wikia's servers anyhow. Requirements All you need to use Live Preview is a web browser with modern JavaScript support and have it enabled when editing a page. These are the browsers in which it has been tested and found to work: *Mozilla, Firefox, K-Meleon or any other Gecko-based browser *Opera 6/7/8 *Konqueror 3.3 (and probably Safari too) *Internet Explorer 6 On the following browsers it does not work: *Internet Explorer 5 If you've tested it on any other browsers, please feel free to add them to the corresponding list at Wikipedia:User:Pilaf/Live Preview. In terms of computer power, any modern computer should suffice. You may notice some delays when processing very long pages on old computers though. How do I install it? Please check the requirements before installing Live Preview. To install Live Preview on this wiki simply copy/paste the full contents of Live Preview/Install into your own monobook.js page (User:YOUR_USER_NAME_HERE/monobook.js). You need to use the default MonoBook skin in your .Once you've done it refresh your browser as indicated at the top of your monobook.js' page. Note that you need to be a user in order for this to work. If you're already using some other sort of extension that uses monobook.js you might not want to replace it with this, but have them combined instead. You may want to configure a few parameters, such as your user name (for signatures). To achieve this simply edit the following line in your monobook.js: :wpUserName = 'Your user name here'; See also Installing on a different wiki. How do I use it? If you've already installed it, all you need to do to start using it is to edit any page. You should now notice a new button labeled "Live Preview" below the regular "Save page" and "Show preview" buttons. Once you've made your edits just click on the Live Preview button to see the resulting page appear instantly before your eyes. You may click it any number of times to see further changes, you never need to reload the page. If you've installed it and still can't see it, please check you fulfill the requirements. If that doesn't seem to be the problem, try contacting Pilaf at Wikipedia. Limitations Live Preview is a work in progress and as such it has its limitations. Some are due to its state of incompleteness, some will most likely never happen as there are certain things that are just not possible to do without running on the servers. In any case you should be aware of what Live Preview can and can't do, and never expect more, you can still use the regular preview for those cases where Live Preview fails. Here's a maintained list of the current limitations of Live Preview (i.e. what it still can't do): * tags * tags * tags *Templates and MediaWiki messages *Undesired HTML stripping *Table of contents *Red links (to non-existing pages) *Time tables *Image galleries In addition to the above list, it should be noted that Live Preview is meant to be an approximation to the real results and should not be considered accurate. If in doubt use the regular preview. In contrast, here is what Live Preview currently can do: *Headings (all levels) *Regular paragraphs *Horizontal bars *Inline formatting (bold and italics) *Wikilinks *External links *Numbered and unordered lists *Definition lists *Tables *Preformatted text (whitespace at line start) *Signatures *Invisible links (interwiki and categories) *Images (though see below) Images Image previews are available in Live Preview. You can disable this in your own settings by changing wpShowImages = true to false in your monobook.js user subpage. Externally hosted images will not display in live preview. (It is recommended you do not use images in this way anyway). Images which do not exist on the wiki will be searched for at the Wikimedia Commons instead. This allows you to find freely licensed images which can then be uploaded to your own Wikia. Please note that if installing on a different wiki, you need to change the ImageBasePath. How does it work? ''Note: This is a technical explanation of how Live Preview does its trick, if you're not into programming you'll probably not be interested in this.'' The source is at Live Preview/Javascript.js. See Wikipedia:User:Pilaf/Live Preview for updates. Installing on a different wiki To use this on another Wikia, you need to copy Live Preview/Javascript.js and Live Preview/Install to your own wiki. It is strongly recommended that you protect these pages to prevent malicious additions to the pages causing arbitrary JavaScript to be executed on any users using Live Preview. In Live Preview/Javascript.js, you must replace www with the title for the wiki you are using it on in the following line. :var wpImageBasePath='http://www.wikia.com/images/'; For multi-language wikis, you can enable interlanguage links by adding the language codes to this line: :var wpInterwikiCodes='none'; For example, on English WikiMac, the line would read: :var wpInterwikiCodes='de|es|fr|it|zh'; Disclaimer Neither Pilaf nor Wikia will not be held responsible for any damages relating to this feature. See also full text of the Wikia disclaimers and Wikipedia disclaimers. Testimonials If you are a happy , you can leave your testimonial at the Live Preview testimonials section at Wikipedia and let the world know how good it is. Live Preview (extension)